package com.hitqz.robot.driver.util;

public enum KcNavStatusEnum {
    //导航状态 0-无到导航点任务 1-等待 2-正在前往导航点 3-暂停 4-完成 5-失败 6-退出 7-等待开/关门
    NAV_NO_TASK(0,"无到导航点任务"),
    NAV_WAIT(1,"等待"),
    NAV_GOING(2,"正在前往导航点"),
    NAV_PAUSE(3,"暂停"),
    NAV_FINISH(4,"完成"),
    NAV_FAIL(5,"失败"),
    NAV_EXIT(6,"退出"),
    NAV_WAIT_DOOR(7,"等待开/关门");

    private final int status;

    private final String des;

    KcNavStatusEnum(int status,String des) {
        this.status = status;
        this.des = des;
    }

    public int getStatus() {
        return status;
    }

    public String getDes() {
        return des;
    }

    public static KcNavStatusEnum getEnum(int status) {
        for (KcNavStatusEnum value : KcNavStatusEnum.values()) {
            if(value.status == status) {
                return value;
            }
        }
        return null;
    }

    public static String getDes(int status) {
        for (KcNavStatusEnum value : KcNavStatusEnum.values()) {
            if(value.status == status) {
                return value.des;
            }
        }
        return "";
    }

}
